/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package main.social.entities;

import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author user
 */
@Entity
@Table(name = "entrylike")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Entrylike.findAll", query = "SELECT e FROM Entrylike e"),
    @NamedQuery(name = "Entrylike.findById", query = "SELECT e FROM Entrylike e WHERE e.id = :id")})
public class Entrylike implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Lob
    @Column(name = "description", length = 2147483647)
    private String description;
    @JoinColumn(name = "Users_id", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private Users usersid;
    @JoinColumn(name = "Entrys_id", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private Entrys entrysid;

    public Entrylike() {
    }

    public Entrylike(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Users getUsersid() {
        return usersid;
    }

    public void setUsersid(Users usersid) {
        this.usersid = usersid;
    }

    public Entrys getEntrysid() {
        return entrysid;
    }

    public void setEntrysid(Entrys entrysid) {
        this.entrysid = entrysid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Entrylike)) {
            return false;
        }
        Entrylike other = (Entrylike) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "main.social.entity.Entrylike[ id=" + id + " ]";
    }
    
}
